package com.shiyang.seckill.redis;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPoolConfig;

/**
 * @author shiyang
 * @create 2020-07-18 7:38 下午
 */
public class RedisConnectionTest {
    public static void main(String[] args) {
        JedisPool jedisPool = new JedisPool(new JedisPoolConfig(), "127.0.0.1", 6379, 2000);
        Jedis jedis = jedisPool.getResource();
        System.out.println(jedis.get("key1"));
        jedis.close();
    }
}
